#ifndef GET_HOST_ID_H
#define GET_HOST_ID_H

#include <string>
#include <unistd.h>

class getHostID
{
private:
public:

	char			hostName[128];
	string			host;
	int				hostID;

	getHostID ()
	{
		gethostname(hostName, 128);
		host = string(hostName);
		
		if (host=="tlc-master.aas.duke.edu")			{hostID = -2;}  //masternode for LINK Mediawall
		else if (host=="smw-master.trinity.duke.edu")	{hostID = -3;}	//masternode for Smith Mediawall
		else if (host=="tile-0-0.local")				{hostID = 0;}
		else if (host=="tile-1-0.local")				{hostID = 1;}
		else if (host=="tile-2-0.local")				{hostID = 2;}
		else if (host=="tile-3-0.local")				{hostID = 3;}
		else if (host=="tile-4-0.local")				{hostID = 4;}
		else if (host=="tile-5-0.local")				{hostID = 5;}
		else if (host=="tile-6-0.local")				{hostID = 6;}
		else if (host=="tile-7-0.local")				{hostID = 7;}
		else if (host=="tile-8-0.local")				{hostID = 8;}
		else if (host=="tile-9-0.local")				{hostID = 9;}
		else if (host=="tile-10-0.local")				{hostID = 10;}
		else if (host=="tile-11-0.local")				{hostID = 11;}
		else {hostID = -1;}
	}

	~getHostID ()
	{
	}
};

#endif